<template>
  <div>
    <!-- header -->
    <WebHeader />

    <!-- 返回条 -->
    <div class="web-back-bars">
      <div class="web-back-bars__icon" @click="$router.back()">
        <img src="../../assets/back-icon.png">
      </div>
      <div class="web-back-bars__bednum">01</div>
      <div>123</div>
    </div>

    <div class="care">
      <div class="care-title">添加护理事项</div>

      <el-input 
        type="text" 
        v-model="form.name" 
        maxlength="20" 
        show-word-limit 
        placeholder="请输入名称">
      </el-input>

      <div class="care-btn">
        <div @click="onCancel" class="btn care-btn__cancel">取消</div>
        <div @click="onSubmit" class="btn care-btn__submit">确定</div>
      </div>
    </div>
  </div>
</template>

<script>
import WebHeader from '@/components/WebHeader'
import { Input } from 'element-ui'

export default {
  data () {
    return {
      form: {
        name: '',
      }
    }
  },
  components: {
    WebHeader,
    ElInput: Input
  },
  methods: {
    onSubmit () {
      console.log('123');
    },
    onCancel () {
      console.log('234');
    }
  }
}
</script>

<style lang="scss" scoped>
.web-back-bars {
  border-bottom: 24px solid #F2F2F2;
}
.care {
  width: 60%;
  height: 100%;
  margin: 0 auto;
  margin-top: 64px;
  &-title {
    font-size: 36px;
    font-weight: 400;
    line-height: 50px;
    color: #333333;
    margin-bottom: 55px;
  }
  &-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-top: 180px;
    .btn {
      width: 368px;
      height: 70px;
      border-radius: 10px;
      font-size: 32px;
      line-height: 70px;
      text-align: center;
    }
    &__submit {
      background: #128FFD;
      color: #FFFFFF;
    }
    &__cancel {
      border: 2px solid #388FFB;
      color: #388FFB;
      margin-right: 120px;
    }
  }
  
}
</style>